
TB_NAME = tb
FILE = file.list
INCDIR = ../include/+../tb/

all: compile

compile:
	vcs -kdb -R -lca -full64 +v2k +lint=TFIPC-L \
	-debug_access-fsdb +define+FSDB \
	-sverilog -f $(FILE) +incdir+$(INCDIR) \
	-o simv\

sim:
	./simv -gui=verdi

verdi:
	verdi -nologo -sv -dbdir ./simv.daidir 
#-ssf $(TB_NAME).fsdb &  

check:
	python process_mem_32_8.py
	sed -i '524289,$$d' mem_8.txt
	sed -i '524289,$$d' g_mem.txt
	diff mem_8.txt g_mem.txt

file:
	find ../ -name "*.v" -o -name "*.sv" -o -name "*.vh" >> file.f
	sed -i "/tb.sv/d" file.f
	sed -i "1 i ../tb/tb.sv" file.f

clean:
	rm -r csrc DVEfiles simv.daidir *.vpd simv *.key verdiLog novas.conf \
				*.rc *.fsdb *.log verdi_config_file *.fsdb.* *.txt \

